home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / man / man-part1 / cat4 / arl2.4 < prev    next >
Text File  |  1999-09-16  |  2KB  |  133 lines

  1.  
  2.  
  3.  
  4. ARL2(4)                        Scilab Function                        ARL2(4)
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. NAME
  12.   arl2 - SISO model realization by L2 transfer approximation
  13.  
  14. CALLING SEQUENCE
  15.   [den,num,err]=arl2(y,den0,n [,imp])
  16.   [den,num,err]=arl2(y,den0,n [,imp],'all')
  17.  
  18. PARAMETERS
  19.  
  20.   y         : real vector or polynomial in z^-1, it contains the coefficients
  21.             of the Fourier's series of the rational system to approximate
  22.             (the impulse response)
  23.  
  24.   den0      : a polynomial which gives an initial guess of the solution, it
  25.             may be poly(1,'z','c')
  26.  
  27.   n         : integer, the degree of approximating transfer function (degree
  28.             of den)
  29.  
  30.   imp       : integer in (0,1,2) (verbose mode)
  31.  
  32.   den       : polynomial or vector of polynomials, contains the
  33.             denominator(s) of the solution(s)
  34.  
  35.   num       : polynomial or vector of polynomials, contains the numerator(s)
  36.             of the solution(s)
  37.  
  38.   err       : real constant or vector , the l2-error achieved for each solu-
  39.             tions
  40.  
  41. DESCRIPTION
  42.   [den,num,err]=arl2(y,den0,n [,imp])  finds a pair of polynomials num and
  43.   den such that the transfer function num/den is stable and it's impulse
  44.   response approximates (with a minimal l2 norm) the vector y assumed to be
  45.   completed by an infinite number of zeros.
  46.  
  47.  
  48.   If y(z)  =  y(1)(1/z)+y(2)(1/z^2)+ ...+ y(ny)(1/z^ny)
  49.  
  50.  
  51.  
  52.   then l2-norm of num/den - y(z) is err.
  53.  
  54.   n is the degree of the polynomial den.
  55.  
  56.   The num/den  transfer function is a L2 approximant of the
  57.  
  58.   Various intermediate results are printed according to imp.
  59.  
  60.  
  61.   [den,num,err]=arl2(y,den0,n [,imp],'all')   returns in the vectors of poly-
  62.   nomials num and den  a set of local optimums for the problem. The solutions
  63.   are sorted with increasing errors err. In this case den0 is already assumed
  64.   to be poly(1,'z','c')
  65.  
  66.  
  67. EXAMPLE
  68.   v=ones(1,20);
  69.   xbasc();
  70.   plot2d1('enn',0,[v';zeros(80,1)],-2,'051',' ',[1,-0.5,100,1.5])
  71.  
  72.   [d,n,e]=arl2(v,poly(1,'z','c'),1)
  73.   plot2d1('enn',0,ldiv(n,d,100),-2,'000')
  74.   [d,n,e]=arl2(v,d,3)
  75.   plot2d1('enn',0,ldiv(n,d,100),-3,'000')
  76.   [d,n,e]=arl2(v,d,8)
  77.   plot2d1('enn',0,ldiv(n,d,100),-5,'000')
  78.  
  79.   [d,n,e]=arl2(v,poly(1,'z','c'),5,'all')
  80.   plot2d1('enn',0,ldiv(n(1),d(1),100),-10,'000')
  81.  
  82. SEE ALSO
  83.   ldiv, imrep2ss , time_id , armax, frep2tf
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.